import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import VR from "postcss-px-to-viewport";
// https://vite.dev/config/
export default defineConfig({
  plugins: [react()],
  css: {
    postcss: {
      plugins: [
        VR({
          viewportWidth: 1080,
          viewportUnit: "vw",
        }),
      ],
    },
  },
  server: {
    proxy: {
      "/api": {
        target: " http://124.221.74.149:3000",
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, ""),
      },
    },
  },
});
